import React, { Component } from 'react'
import LifeCycle from './views/LifeCycle3'
export default class App extends Component {
 state={
  isShow:true
 }
  render() {
    return (
      <div>
         {/* <LifeCycle num={this.state.num}></LifeCycle>
         <button onClick={()=>this.setState({num:this.state.num+=2})}>父组件更改</button> */}
        <button onClick={()=>this.setState({isShow:false})}>销毁定时器组件</button>
        {this.state.isShow&&<LifeCycle></LifeCycle>}
      </div>
    )
  }
}

